﻿using System.ComponentModel.DataAnnotations;
using PortalWeb.CMS.Core.Entity;
using PortalWeb.I18N;

namespace PortalWeb.Models.Cms
{
    public class CategoryViewModel
    {
        public CategoryViewModel()
        {

        }

        public CategoryViewModel(Category category)
        {
            this.Id = category.Id;
            this.ParentId = category.ParentId;
            this.Name = category.Name;
            this.Model = category.Model;
        }

        public int Id { get; set; }

        [Display(ResourceType = typeof (Resources), Name = "ParentId")]
        public int ParentId { get; set; }

        [Display(ResourceType = typeof (Resources), Name = "CategoryName")]
        public string Name { get; set; }

        [Display(ResourceType = typeof (Resources), Name = "Model")]
        public string Model { get; set; }
    }
}